package common;

import java.io.Serializable;


public abstract class Casella implements Serializable{

	private int posi;
	private int posj;
	private int energia=0;
	private boolean libera;
	private Dinosauro dino=null;
	
	public Casella(int i, int j){
		setPosizione(i,j);
		setLibera();
	}
	
	
	public void setPosizione(int i, int j){
		posi=i;
		posj=j;
	}
	
	
	public int getEnergia(){
		return energia;
	}
	
	
	public void setEnergia(int e){
		energia=e;
	}

	
	public int getPosizioneI(){
		return posi;
	}
	
	
	public int getPosizioneJ(){
		return posj;
	}
	
	
	public void updateEnergia(){	
	}
	
	
	public boolean getLibera(){
		return libera;
	}
	
	
	public void setLibera(){
		libera=true;
		setDino(null);
	}
	
	
	public void setOccupa(Dinosauro d){
		setDino(d);
		libera=false;
	}

	
	public void setDino(Dinosauro dino) {
		this.dino = dino;
	}

	
	public Dinosauro getDino() {
		return dino;
	}
	
	
}
